//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __AURA_PRIVATE_H_
#define __AURA_PRIVATE_H_

#include "auratypes.h"
#include "wince.h"

#ifdef _DEBUG
#define FixMe(statement)  Aura_printf("[FixMe]<%s>"##statement##"\n", __FUNCTION__);
#else
#define FixMe(statement)
#endif

#undef assert
#ifdef _DEBUG
void __cdecl _assert(const char *exp, const char *fn, int ln);
#define assert(exp) do { \
                        if (exp) { \
                            (void)0; \
                        } else { \
                            _assert(#exp, __FILE__, __LINE__); \
                        } \
                    } while(0)
#else
#define assert(exp)
#endif

Aura_ECode GetLastAuraECode();

// -----------for time convertion ---------------------------
void WinSysTimeConvertToAura(
          /* [in]  */ LPSYSTEMTIME pWinSysTime,
          /* [out] */ Aura_SystemTime * pAuraSysTime);

void AuraSysTimeConvertToWin(
          /* [in]  */ Aura_SystemTime * pAuraSysTime,
          /* [out] */ LPSYSTEMTIME pWinSysTime);

// ---------- for priority -----------------------------------

Aura_ThreadPriority ConvertToAuraPriority(
          /* [in]  */ int priority);

int ConvertToWinPriority(
          /* [in]  */ Aura_ThreadPriority priority);

DWORD ConvertToWinAllocateType(
        /* [in]  */ Aura_MemoryMapFlags flags);

DWORD ConvertToWinMemoryProection(
        /* [in]  */ Aura_MemoryProtection protect);

Aura_Millisecond32 ConvertToAuraMilliseconds(
        /* [in] */ LPFILETIME pFileTime);

DWORD ConvertToWinFileAccess(
        /* [in]  */ Aura_MemoryProtection protect);

#endif // __AURA_PRIVATE_H_

